﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="news-template.aspx.cs" Inherits="MediaMonitor.admin.news_template" MasterPageFile="~/admin.master" Theme="default" Title="Add new Template" %>

<asp:Content ContentPlaceHolderID="Body" runat="server">

    <script type="text/javascript">
        function ShowHideDiv(div, show) {
            if (show) {
                div.style.display = 'block';
                document.getElementById('dvUpload').style.display = 'none';
            }
            else {
                div.style.display = 'none';
                document.getElementById('dvUpload').style.display = 'block';
            }
        }
    </script>

    <center>
    <div id="dvUpload" class="Box" style="width: 400px; padding-bottom: 15px; text-align:center;" align="center">

    <asp:Panel ID="pnlUpload" runat="server">
    
<table style="text-align:left" >
    <tr>
        <th>Template Name</th>
        <td><asp:TextBox ID="tbName" runat="server" />
            <br />
         </td>
    </tr>

    <tr>
        <th>First Picture:</th>
        <td>
            <asp:FileUpload ID="flPicture1" runat="server" />
        </td>
    </tr>
    <tr>
        <th>
            Second Picture:
        </th>
        <td>
            <asp:FileUpload ID="flPicture2" runat="server" />
        </td>
    </tr>
    <tr>
        <th>
            Third Picture:
        </th>
        <td>
            <asp:FileUpload ID="flPicture3" runat="server" />
        </td>
    </tr>

    <tr>
        <td></td>
        <td>
            <br /><br />
            <small>If name template already exists, images would be overwritten.</small>
            <br />
            <asp:ImageButton ID="btnUpload" runat="server" SkinID="Upload" OnClientClick="javascript:ShowHideDiv(document.getElementById('dvUploading'), true)"
                OnClick="btnUpload_Click" />
        </td>
    </tr>
</table>
    </asp:Panel>
  

</div>  </center>
<br /><br />
    <center>
        <div id="dvUploading" class="GrayBox" style="display: none; text-align: center; width: 300px;"
            align="center">
            <h3>
                Uploading Images...</h3>
            <img src="../App_Themes/default/ajax/loadingAnimation.gif" />
            <br />
            <br />
        </div>
    </center>

    <asp:Panel ID="pnlInfo" runat="server" Visible="false">
        <center>
            <div class="Box" style="width: 400px; text-align: center;">
                <asp:Label ID="lblMsg1" runat="server" Font-Bold="true"></asp:Label><br />
                <asp:Label ID="lblMsg2" runat="server" Font-Bold="true"></asp:Label><br />
                <asp:Label ID="lblMsg3" runat="server" Font-Bold="true"></asp:Label><br />
                <br />
                <br />
                <asp:LinkButton ID="lnkAddNew" runat="server" OnClick="lnkAddNew_Click">Add new Template</asp:LinkButton>
                <br /><br />
                <a href="news-template-list.aspx">Back to News Template List</a>
            </div>
        </center>
    </asp:Panel>
</asp:Content>